//
//  MPlusVideoCaurseTableViewCell.m
//  medicineplus
//
//  Created by gufei on 15-5-18.
//  Copyright (c) 2015年 chn_ruby@126.cn. All rights reserved.
//

#import "MPlusVideoCaurseTableViewCell.h"
#import "MPlusDefine.h"
#import "MPlusString.h"

#define IMAGE_HEIGHT_120 120
#define IMAGE_WIDTH (SCREEN_WIDTH-PADDING_10*3)/2
#define CELL_HEIGHT 190

@implementation MPlusVideoCaurseTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        _aVideo1 = [UIButton buttonWithType:UIButtonTypeCustom];
        _aVideo1.frame = CGRectMake(PADDING_10, PADDING_10, IMAGE_WIDTH, IMAGE_HEIGHT_120);
        [_aVideo1 setImage:[UIImage imageNamed:kIconPlayer] forState:UIControlStateNormal];
        [self addSubview:_aVideo1];
        
        _aVideo2 = [UIButton buttonWithType:UIButtonTypeCustom];
        _aVideo2.frame = CGRectMake(PADDING_10*2+IMAGE_WIDTH, PADDING_10, IMAGE_WIDTH, IMAGE_HEIGHT_120);
        [_aVideo2 setImage:[UIImage imageNamed:kIconPlayer] forState:UIControlStateNormal];
        [self addSubview:_aVideo2];
        
        _aTitle1 = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10, PADDING_10*2+IMAGE_HEIGHT_120, IMAGE_WIDTH, LABEL_HEIGHT_20*2)];
        _aTitle1.lineBreakMode = NSLineBreakByWordWrapping;
        _aTitle1.numberOfLines = 0;
        _aTitle1.font = [UIFont systemFontOfSize:[kFontSize16 floatValue]];
        _aTitle1.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_aTitle1];
        
        _aTitle2 = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10*2+IMAGE_WIDTH, PADDING_10*2+IMAGE_HEIGHT_120, IMAGE_WIDTH, LABEL_HEIGHT_20*2)];
        _aTitle2.lineBreakMode = NSLineBreakByWordWrapping;
        _aTitle2.numberOfLines = 0;
        _aTitle2.font = [UIFont systemFontOfSize:[kFontSize16 floatValue]];
        _aTitle2.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_aTitle2];
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
